
package com.cos.service.admin.dynamic;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cos.dao.DaoSupport;
import com.cos.entity.Page;
import com.cos.util.PageData;

/*
 * 
 *   YANG
 */
@Service("dynamicTagService")
public class DynamicTagService {
	
	@Autowired
	private DaoSupport daoSupport ; 
	
	/*
	* 新增
	*/
	public void save(PageData pd) throws Exception {
		
		daoSupport.save("DynamicTagMapper.save", pd) ;
		
	}
	/*
	* 删除
	*/
	public void delete(PageData pd)throws Exception{
		daoSupport.delete("DynamicTagMapper.delete", pd);
	}
	
	/*
	* 修改
	*/
	public void edit(PageData pd)throws Exception{
		daoSupport.update("DynamicTagMapper.edit", pd);
	}
	
	/*
	*列表
	*/
	public List<PageData> list(Page page)throws Exception{
		return (List<PageData>)daoSupport.findForList("DynamicTagMapper.datalistPage", page);
	}
	
	/*
	*列表(全部)
	*/
	public List<PageData> listAll(PageData pd)throws Exception{
		return (List<PageData>)daoSupport.findForList("DynamicTagMapper.listAll", pd);
	}
	
	/*
	* 通过id获取数据
	*/
	public PageData findById(PageData pd)throws Exception{
		return (PageData)daoSupport.findForObject("DynamicTagMapper.findById", pd);
	}
	
	/*
	* 批量删除
	*/
	public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
		daoSupport.delete("DynamicTagMapper.deleteAll", ArrayDATA_IDS);
	}
	
	/*
	* 批量获取
	*/
	public List<PageData> getAllById(String[] ArrayDATA_IDS)throws Exception{
		return (List<PageData>)daoSupport.findForList("DynamicTagMapper.getAllById", ArrayDATA_IDS);
	}
	
	
	
	
	
	
	
}
